package com.heima.wemedia.service.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dto.WmUserLoginDto;
import com.heima.wemedia.service.service.WmUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "/login")
public class WmUserLoginController {
    @Autowired
    private WmUserService wmUserService;

    @PostMapping(path = "/in")
    public ResponseResult login(@RequestBody WmUserLoginDto dto){
        return wmUserService.login(dto);

    }
}
